* You must specify a configuration before calling this routine.
* If you are getting or setting multiple preferences, you should place
* these calls within an ICBegin/ICEnd pair.
* If you call this routine outside of such a pair, it implicitly
* calls ICBegin(inst, icReadWritePerm).
* Sets the preference specified by key from the IC database to the
* value contained in prefh.
* key must not be the empty string.
* If prefh is nil then the preference value is not set.
* If buf is not nil then the preference value is set to the data
* contained in it.
* If attr is ICattr_no_change then the preference attributes are not set.
* Otherwise the preference attributes are set to attr.
* Returns icPermErr if the previous ICBegin was passed icReadOnlyPerm.
* Returns icPermErr if current attr is locked, new attr is locked and prefh <> nil.
*)
function ICCCountPref(inst : ComponentInstance; var count : longint) : ICError;
{$ifc not GeneratingCFM}
inline $2F3C, 4, 8, $7000, $A82A;
{$endc}
(* You must specify a configuration before calling this routine.
* You must be inside an ICBegin/End pair to call this routine.
* Counts the total number of preferences.
* If the routine returns an error, count is set to 0.
*)
function ICCGetIndPref(inst : ComponentInstance; n : longint; var key : Str255) : ICError;
{$ifc not GeneratingCFM}
inline $2F3C, 8, 9, $7000, $A82A;
{$endc}
(* You must specify a configuration before calling this routine.
* You must be inside an ICBegin/End pair to call this routine.
* Returns the key of the Nth preference.
* n must be positive.
* Returns icPrefNotFoundErr if n is greater than the total number of preferences.
* If the routine returns an error, key is undefined.
*)
function ICCDeletePref(inst : ComponentInstance; key : Str255) : ICError;
{$ifc not GeneratingCFM}
inline $2F3C, 4, 12, $7000, $A82A;
{$endc}
(* You must specify a configuration before calling this routine.
* You must be inside an ICBegin/End pair to call this routine.
* Deletes the preference specified by key.
* key must not be the empty string.
* Returns icPrefNotFound if the preference specified by key is not present.
*)
function ICCEnd(inst : ComponentInstance) : ICError;
{$ifc not GeneratingCFM}
inline $2F3C, 0, 10, $7000, $A82A;
{$endc}
(* You must specify a configuration before calling this routine.
* You must be inside an ICBegin/End pair to call this routine.
* Terminates a preference session, as started by ICBegin.
* You must have called ICBegin before calling this routine.
*)
(* ***** User Interface Stuff ***** *)
function ICCEditPreferences(inst : ComponentInstance; key : Str255) : ICError;
{$ifc not GeneratingCFM}
inline $2F3C, 4, 15, $7000, $A82A;
{$endc}
(* Requires IC 1.1.
* You must specify a configuration before calling this routine.
* You do not have to be inside an ICBegin/End pair to call this routine.
* Instructs IC to display the user interface associated with editing
* preferences and focusing on the preference specified by key.
* If key is the empty string then no preference should be focused upon.
* You must have specified a configuration before calling this routine.
* You do not need to call ICBegin before calling this routine.
* In the current implementation this launches the IC application
* (or brings it to the front) and displays the window containing
* the preference specified by key.
* It may have a radically different implementation in future
* IC systems.
*)
(* ***** URL Handling ***** *)
function ICCParseURL(inst : ComponentInstance; hint : Str255; data : Ptr; len : longint; var selStart : longint; var selEnd : longint; url : Handle) : ICError;
{$ifc not GeneratingCFM}
inline $2F3C, 24, 16, $7000, $A82A;
{$endc}
(* Requires IC 1.1.
* You must specify a configuration before calling this routine.
* You do not have to be inside an ICBegin/End pair to call this routine.
* Parses a URL out of the specified text and returns it in a canonical form
* in a handle.
* hint indicates the default scheme for URLs of the form "name@address".
* If hint is the empty string then URLs of that form are not allowed.
* data points to the start of the text. It must not be nil.
* len indicates the length of the text. It must be non-negative.
* selStart and selEnd should be passed in as the current selection of
* the text. This selection is given in the same manner as TextEdit,
* ie if selStart = selEnd then there is no selection only an insertion
* point. Also selStart ≤ selEnd and 0 ≤ selStart ≤ len and 0 ≤ selEnd ≤ len.
* selStart and selEnd are returned as the bounds of the URL. If the
* routine returns an error then these new boundaries may be
* invalid but they will be close.
* The incoming url handle must not be nil. The resulting URL is normalised
* and copied into the url handle, which is resized to fit.
*)
function ICCLaunchURL(inst : ComponentInstance; hint : Str255; data : Ptr; len : longint; var selStart : longint; var selEnd : longint) : ICError;
{$ifc not GeneratingCFM}
inline $2F3C, 20, 17, $7000, $A82A;
{$endc}
(* Requires IC 1.1.
* You must specify a configuration before calling this routine.
* You do not have to be inside an ICBegin/End pair to call this routine.
* Parses a URL out of the specified text and feeds it off to the
* appropriate helper.
* hint indicates the default scheme for URLs of the form "name@address".
* If hint is the empty string then URLs of that form are not allowed.
* data points to the start of the text. It must not be nil.
* len indicates the length of the text. It must be non-negative.
* selStart and selEnd should be passed in as the current selection of
* the text. This selection is given in the same manner as TextEdit,
* ie if selStart = selEnd then there is no selection only an insertion
* point. Also selStart ≤ selEnd and 0 ≤ selStart ≤ len and 0 ≤ selEnd ≤ len.
* selStart and selEnd are returned as the bounds of the URL. If the
* routine returns an error then these new boundaries may be
* invalid but they will be close.
* The URL is parsed out of the text and passed off to the appropriate
* helper using the GURL AppleEvent.
*)
(* ***** Mappings Routines *****
*
* Routines for interrogating mappings database.
*
* ----- High Level Routines -----
*)
function ICCMapFilename(inst : ComponentInstance; filename : Str255; var entry : ICMapEntry) : ICError;
{$ifc not GeneratingCFM}
inline $2F3C, 8, 24, $7000, $A82A;
{$endc}
(* Requires IC 1.1.
* You must specify a configuration before calling this routine.
* If you are getting or setting multiple preferences, you should place
* these calls within an ICBegin/ICEnd pair.
* If you call this routine outside of such a pair, it implicitly
* calls ICBegin(inst, icReadWritePerm).
* Takes the name of an incoming file and returns the most appropriate
* mappings database entry, based on its extension.
* filename must not be the empty string.
* Returns icPrefNotFoundErr if no suitable entry is found.
*)
function ICCMapTypeCreator(inst : ComponentInstance; fType : OSType; fCreator : OSType; filename : Str255; var entry : ICMapEntry) : ICError;
{$ifc not GeneratingCFM}
inline $2F3C, 16, 25, $7000, $A82A;
{$endc}
(* Requires IC 1.1.
* You must specify a configuration before calling this routine.
* You must be inside an ICBegin/End pair to call this routine.
* Takes the type and creator (and optionally the name) of an outgoing
* file and returns the most appropriate mappings database entry.
* The filename may be either the name of the outgoing file or
* the empty string.
* Returns icPrefNotFoundErr if no suitable entry found.
*)
(* ----- Mid Level Routines ----- *)
function ICCMapEntriesFilename(inst : ComponentInstance; entries : Handle; filename : Str255; var entry : ICMapEntry) : ICError;
{$ifc not GeneratingCFM}
inline $2F3C, 12, 28, $7000, $A82A;
{$endc}
(* Requires IC 1.1.
* You must specify a configuration before calling this routine.
* You do not have to be inside an ICBegin/End pair to call this routine.
* Takes the name of an incoming file and returns the most appropriate
* mappings database entry, based on its extension.
* entries must be a handle to a valid IC mappings database preference.
* filename must not be the empty string.
* Returns icPrefNotFoundErr if no suitable entry is found.